1. Field of the Invention
The present invention relates to a communication apparatus that selects a network to which a connection is to be established out of a plurality of networks, a method for controlling the communication apparatus, and a storage medium.
2. Description of the Related Art
In wireless communication, which is typified by wireless LANs in conformity with the IEEE 802.11 standard series, there are a large number of communication parameters that must be set. Examples of such communication parameters include an ESSID, which is a network identifier, an encryption method, an encryption key, an authentication method, and an authentication key, and it is very troublesome for a user to manually enter these parameters.
For this reason, many automatic setting methods (hereinafter simply referred to as “automatic setting”) for easily setting communication parameters in a wireless device have been devised. In the automatic setting as described above, one device provides communication parameters to the other device using a procedure and messages that have been predetermined between the devices to be connected to each other, thereby automatically performing setting of the communication parameters.
“Wi-Fi CERTIFIED for Wi-Fi Protected Setup: Easing the User Experience for Home and Small Office Wi-Fi Networks, http:/www.wi-fi.org/wp/wifi-protected-setup” discloses the Wi-Fi Protected Setup (hereinafter referred, to as the “WPS”), which is an industry standard for automatic setting of communication parameters between an access point (hereinafter referred to as “AP”) and a station (hereinafter referred to as “STA”).
Once the STA has obtained communication parameters by automatic setting as described above, it searches for a network therearound and connects to a network corresponding to the obtained communication parameters.
Meanwhile, in recent years, APs are equipped with various functions, among which is a function called “multi-BSSID (Multi Basic Service Set Identifier)”. The multi-BSSID is the functionality that enables a single AP to construct a plurality of wireless networks, and makes it possible to easily realize construction of a network appropriate for a particular purpose, such as a network for audio-visual devices or a network for game machines.
Moreover, some APs construct a network for automatic setting from a network for communication using the multi-BSSID to execute automatic setting.
IEEE Computer Society, “IEEE Standard for Information technology for Information technology—Telecommunication and information exchange between systems—Local and metropolitan area networks—Specific requirements, Part 11: Wireless LAN Medium Access Control(MAC) and Physical Layer (PHY) Specifications”, IEEE Std 802.11-2007, Revision of IEEE Std 802.11-1999.” discloses the Wi-Fi Protected Access (hereinafter referred to as the “WPA”), which is an industry standard for the encryption method, the encryption key, the authentication method, the authentication key, and the like of wireless communication connection.
The WPA includes the WPA1 and the WPA2, and there also is an AP equipped with a Mixed mode in which the WPA1 and the WPA2 can be operated simultaneously.
The STA can obtain the ESSID, the authentication method, the encryption method, the encryption key, and the like by automatic setting. On the other hand, during the stage of searching for a network to which a connection is to be established using the obtained parameters, the STA cannot obtain information of the encryption key even though it can obtain information of the ESSID, the authentication method, the encryption method, and the like.
Thus, during the stage of the search for a network, even though the STA can check agreement of the ESSIDs, the authentication methods, and the encryption methods, it cannot check agreement of the encryption keys.
For this reason, in an environment in which networks having the same ESSID, authentication method, and encryption method but different encryption keys are mixed around the STA, it is difficult to judge which network is a desired network. As a result, during the stage of connection processing, there are cases where connection processing fails due to disagreement of encryption keys. Thus, trial and error is necessitated, resulting in a problem in that extra time is taken to complete the connection.
Moreover, during automatic setting, if a plurality of networks that can provide communication parameters are detected, it has been difficult to judge whether the plurality of networks are constructed by the same base station or by different base stations. To address this issue, even in the case where a single base station is constructing a plurality of networks, for example, measures as follows have been taken: the user is caused to select a network, or automatic setting itself is ended. These measures have been factors that increase the time taken for connection processing.
In view of the above-described problems, the present invention provides a technology for efficiently searching for a network serving as a connection destination out of a plurality of networks.